import http from '@/utils/http'

// 获取题目分类列表
export function getQuestionCategoryListApi() {
    return http({
      url: 'question-category/list',
      method: 'get',
    })
  }
  //根据id获取题目类别详情
  export function getQuestionCategoryByIdApi(id) {
    return http({
      url: `question-category/info/${id}`,
      method: 'get',
    })
  }
  //新增题目类别
  export function addQuestionCategoryApi(data) {
    return http({
      url: 'question-category/save',
      method: 'post',
      data:data
    })
  }

  //修改题目类别
  export function updateQuestionCategoryApi(data) {
    return http({
      url: 'question-category/update',
      method: 'put',
      data:data
    })
  }
  //删除题目类别
  export function deleteQuestionCategoryApi(id) {
    return http({
      url: `question-category/delete/${id}`,
      method: 'delete',
    })
  }